<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="../../static/personal_center/css/index.css">
    <link rel="stylesheet" type="text/css" href="../../static/personal_center/css/common.css">
    <script type="text/javascript" src="../../static/personal_center/js/index.js"></script>
    <link rel="stylesheet" href="../../static/personal_center/font_2369197_oqktwkt71s/iconfont.css" media="screen">
    <link rel="stylesheet" href="../../static/public_file/css/PersonnelChooser.css">
    <link rel="stylesheet" href="../../static/public_file/css/DepartmentSelection.css">
    <style>
        .add_background {
            background: #A9A9A9;
        }
        .li-class {
            list-style: none;
            margin-top: 2%;
            color: #0b0b0b;
            cursor: pointer;
            height: 30px;
            line-height: 30px;
        }
        #loading {
            background: #fff url(../../static/public_file/images/jiazai.gif) no-repeat scroll center center;
            height: 100%; width: 100%; background-size: 10%; position: fixed; margin-top: 0px; top: 0px; left: 0px; bottom: 0px;
            overflow: hidden !important; right: 0px; z-index: 999999;background-color: rgba(255, 255, 255, 0.08);
        }
    </style>
</head>
<body>
    <div id="loading">
        <div id="loading-center">
        </div>
    </div>

    <div style="width: 100%;height: 40px;border-bottom: #cfcfcf solid 1px;background: white;font-size: 0;text-align: right;padding-right: 25px;">
        <button onclick="line_models()" style="width: 100px;height: 30px;margin-top: 5px;border-radius: 3px;border: #00a0e9 solid 1px;background: #00a0e9;color: white;cursor: pointer;margin-right: 15px;">添加</button>
{#        <input type="text" id="search_value" name="search_val" style="width: 300px;display: inline-block;border-bottom-left-radius: 3px;border-top-left-radius: 3px;border: #0d8ddb solid 1px;vertical-align: top;font-size: 14px;padding-left: 2px;margin-top: 5px;height: 30px;outline: none;" placeholder="请输入搜索关键词">#}
{#        <button class="search-action" style="width: 100px;border-bottom-right-radius: 3px;border-top-right-radius: 3px;display: inline-block;font-size: 14px;border: #0d8ddb solid 1px;border-left: none;background: #0d8ddb;color: white;margin-top: 5px;height: 34px;margin-right: 15px;outline: none;cursor: pointer;">搜索</button>#}
    </div>

    <div style="width: 100%;height: 100%;background: white;">
        <div id="my_application" style="width: 100%;height: 100%;overflow: auto;background-color: white;">
            <div class="right-box" style="width: 100%;height: 100%;margin-top: 0;">
                <div style="height: 100%;width: 100%;overflow: auto;border-bottom: #cccccc solid 1px;background-color: white;">
                    <section class="grid-main" style="height: calc(100vh - 45px);">
                        <table id="main_table"></table>
                    </section>
                </div>
            </div>
        </div>
    </div>

    <div id="new_models2" class="shade">
        <div id="new_models3" style="width: 100%;height: 100%;position: absolute;">
            <div style="width: 500px;background: #F5F5F5;z-index: 10000;position: absolute;top: 50%;left: 50%;transform:translate(-50%,-50%);border-radius: 3px;border: #dfdfdf solid 1px;">
                <div id="box" style="width: 100%;height: 40px;border-bottom: #cfcfcf solid 1px;line-height: 40px;cursor: move;">
                    <div style="width: 20%;margin-left: 1%;display: inline-block;line-height: 0px;font-size: 14px;">
                        委员会
                    </div>
                    <span onclick="close_models3()" style="float: right;padding-right: 2%;cursor: pointer;">
                        <i class="iconfont icon-quchu"></i>
                    </span>
                </div>
                <div style="width: 100%;border-bottom: #dfdfdf solid 1px;padding-bottom: 20px;padding-top: 15px;padding-left: 10px;">
                    <div style="width: 100%;height: 40px;">
                        <label for="">委员会名称:</label>
                        <input id="committee_name" type="text" style="width: 300px;height: 25px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;" autocomplete="off">
                    </div>

                    <div style="width: 100%;height: 40px;margin-top: 5px;">
                        <label for="">委员会级别:</label>
                        <select name="" id="committee_level" style="width: 305px;height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;">
                            <option value="0">请选择委员会级别</option>
                            <option value="1">一级委员会</option>
                            <option value="2">二级委员会</option>
                            <option value="3">三级委员会</option>
                        </select>
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <label for="">主&nbsp;任&nbsp;委&nbsp;员:</label>
                        <input id="chairman" type="text" onclick="model_line_with_parameters(this.id)" style="width: 300px;height: 25px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;" autocomplete="off">
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <label for="">副主任委员:</label>
                        <input id="vice_chairman" type="text" onclick="model_line_with_parameters(this.id)" style="width: 300px;height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;" autocomplete="off">
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <label for="" style="letter-spacing: 0.4px;">联&nbsp;&nbsp;&nbsp;络&nbsp;&nbsp;&nbsp;员:</label>
                        <input id="liaison_officer" type="text" onclick="model_line_with_parameters(this.id)" style="width: 300px;height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;" autocomplete="off">
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <label for="" style="letter-spacing: 0.4px;">办&nbsp;&nbsp;&nbsp;公&nbsp;&nbsp;&nbsp;室:</label>
                        <input id="company" type="text" onclick="show_office_model()" style="width: 300px;height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;" autocomplete="off">
                    </div>

                    <div style="width: 100%;height: 40px;">
                        <label for="">委&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;员:</label>
                        <input id="members" type="text" onclick="model_line_with_parameters(this.id)" style="width: 300px;height: 30px;border-radius: 3px;border: #cfcfcf solid 1px;outline: none;padding-left: 2px;" autocomplete="off">
                    </div>
                </div>
                <div style="width: 100%;text-align: center;padding-right: 2%;height: 40px;">
                    <button onclick="close_models3()" style="width: 80px;height: 30px;border: #dfdfdf solid 1px;margin-top: 5px;border-radius: 3px;background: #1E90FF;color: white;cursor: pointer;">
                        取消
                    </button>
                    <button style="cursor: pointer;width: 80px;height: 30px;border: #dfdfdf solid 1px;margin-top: 5px;border-radius: 3px;background: red;color: white;margin-left: 15px;display: inline-block;" onclick="upload_excel()">
                        确认
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div id="staff-select" class="shade">
        <div id="staff-model" style="width: 100%;height: 100%;position: absolute;">
            <div style="width: 900px;height: 500px;background: #F5F5F5;z-index: 10000;position: absolute;top: 50%;left: 50%;transform:translate(-50%,-50%);border-radius: 3px;border: #dfdfdf solid 1px;">
                <div id="staff-box" style="width: 100%;height: 40px;background: #f4f7fa;cursor: move;border-top-left-radius: 5px;border-top-right-radius: 5px;border-bottom: #dfdfdf solid 1px;">
                    <div style="width: 20%;margin-left: 1%;display: inline-block;line-height: 40px;font-size: 14px;">
                        选择人员
                    </div>
                    <span onclick="close_model()" style="float: right;padding-right: 2%;cursor: pointer;line-height: 37px;">
                        <i class="iconfont icon-quchu"></i>
                    </span>
                </div>
                <div style="height: 460px;width: 100%;border-bottom: #dfdfdf solid 1px;">
                    <div style="width: 70px;height: 100%;border-right: #cfcfcf solid 1px;display: inline-block;vertical-align: top;">
                        <div id="dep" class="navigation navigation_color" onclick="change_navigation(this)">部门</div>
                        <div id="limits" class="navigation" onclick="change_navigation(this)">权限</div>
                        <div id="fun" class="navigation" onclick="change_navigation(this)">职能</div>
                    </div>
                    <div style="width: 200px;height: 100%;border-right: #cfcfcf solid 1px;display: inline-block;vertical-align: top;">
                        <div style="width: 100%;height: 50px;line-height: 50px;">
                            <input id="SearchDep" onkeydown="SearchDepartment()" class="search_input" type="text" placeholder="搜索" autocomplete="off">
                        </div>
                        <div id="SecondaryNavigation" style="width: 100%;height: 403px;line-height: 50px;overflow: auto;"></div>
                    </div>
                    <div style="width: 200px;height: 100%;border-right: #cfcfcf solid 1px;display: inline-block;vertical-align: top;">
                        <div style="width: 100%;height: 50px;line-height: 50px;">
                            <input type="checkbox" id="select-all" onclick="SelectAll(this)">
                            <input id="SearchPeo" onkeydown="SearchProple()" class="search_input" type="text" placeholder="搜索" autocomplete="off" style="width: 65%;">
                        </div>
                        <div id="ThreeNavigation" style="width: 100%;height: 403px;line-height: 50px;overflow: auto;"></div>
                    </div>
                    <div style="width: 410px;height: 100%;display: inline-block;vertical-align: top;overflow: auto">
                        <div style="width: 100%;height: 40px;text-align: left;font-size: 14px;line-height: 40px;">
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;已选 <span id="selected-number">0</span> 人
                        </div>
                        <div id="selected-div" style="width: 100%;font-size: 14px;height: 370px;overflow: auto;line-height: 20px;">

                        </div>
                        <div style="width: 100%;font-size: 14px;height: 40px;text-align: center;">
                            <button id="finish_with" style="width: 100px;height: 30px;line-height: 25px;text-align: center;letter-spacing: 5px;border-radius: 3px;border: #cfcfcf solid 1px;font-size: 14px;cursor: pointer;margin-top: 10px;">完成</button>
                            <button onclick="close_model()" style="margin-left: 15px;width: 100px;height: 30px;line-height: 25px;text-align: center;color: #0abb78;letter-spacing: 5px;border-radius: 3px;font-size: 14px;border: #cfcfcf solid 1px;cursor: pointer;margin-top: 10px;">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="selection-office" class="office-shade">
        <div id="office-model">
            <!-- 标题 -->
            <div id="office-title" style="font-size: 14px;line-height: 40px;">
                选择科室
                <span onclick="close_office_models()" style="float: right;padding-right: 2%;cursor: pointer;"><i class="iconfont icon-quchu"></i></span>
            </div>
            <hr>
            <div style="width: 55%;height: 350px;vertical-align: top;left: 0;display: inline-block;border-right: #cfcfcf solid 1px;">
                <div style="width: 100%;height: 50px;line-height: 50px;padding-left: 2%;">
                    <input id="search_data1" onkeydown="search_dep()" class="search-input" type="text" placeholder="搜索" autocomplete="off" style="width: 85%;">
                </div>
                <div id="processed" style="width: 100%;height: 300px;overflow: auto;">
                    {% for company in company_list %}
                        <div style="width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #0b0b0b;">
                            <input class="check_box1" id="check-{{ company.id }}" type="checkbox" onclick="check_dep_ff('{{ company.name }}', 'check-{{ company.id }}', false)"> {{ company.name }}
                        </div>
                    {% endfor %}
                </div>
            </div>

            <div style="width: 43%;height: 360px;vertical-align: top;left: 0;display: inline-block;">
                <div style="width: 100%;height: 50px;line-height: 50px;padding-left: 2%;font-size: 14px;">
                    已选择科室
                </div>
                <div id="processed_prople" style="width: 100%;height: 265px;overflow: auto;padding-left: 2%;">

                </div>
                <div style="width: 100%;height: 40px;text-align: center;">
                    <button onclick="summit_val()" style="border-radius: 2px;height: 30px;margin-top: 5px;border: #1E90FF solid 1px;background: #1E90FF;color: white;width: 80px;letter-spacing: 4px;font-size: 14px;">
                        提交
                    </button>
                    <button onclick="close_office_models()" style="border-radius: 2px;height: 30px;margin-top: 5px;border: #cfcfcf solid 1px;width: 80px;letter-spacing: 4px;margin-left: 15px;font-size: 14px;">
                        取消
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript" src="../../static/administrative/js/other/jquery.js"></script>
    <script type="text/javascript" src="../../static/public_file/js/PersonnelChoosersNew.js" charset="gb2312"></script>
    <script type="text/javascript" src="../../static/public_file/js/DepartmentSelectionMultiple1.js"></script>
    <script>
        const gridManagerName = "test",
        TYPE_MAP = {1: "HTML/CSS", 2: "nodeJS", 3: "javaScript", 4: "前端鸡汤", 5: "PM Coffee", 6: "前端框架", 7: "前端相关"},
        GM_PUBLISH_METHOD_MAP = {
            init: {key: "init", relyInit: !1, title: "初始化", code: 'demo1.initGM(document.querySelector("table"));'},
            get: {key: "get", relyInit: !0, title: "获取表格的实时配置信息", code: `GridManager.get('${gridManagerName}');`},
            version: {key: "version", relyInit: !1, title: "获取当前GridManager的版本号", code: "GridManager.version;"},
            getLocalStorage: {
                key: "getLocalStorage",
                relyInit: !0,
                title: "获取表格用户记忆",
                code: `GridManager.getLocalStorage('${gridManagerName}');`
            },
            resetLayout: {
                key: "resetLayout",
                relyInit: !0,
                title: "重置表格布局",
                code: `GridManager.resetLayout('${gridManagerName}', '800px', '500px');`
            },
            clear: {
                key: "clear",
                relyInit: !0,
                title: "清除表格记忆数据",
                code: `GridManager.clear('${gridManagerName}');`
            },
            getTableData: {
                key: "getTableData",
                relyInit: !0,
                title: "获取指定tr所使用的数据",
                code: `GridManager.getTableData('${gridManagerName}');`
            },
            getRowData: {
                key: "getRowData",
                relyInit: !0,
                title: "获取指定tr所使用的数据",
                code: `GridManager.getRowData('${gridManagerName}', document.querySelector("table[grid-manager=${gridManagerName}] tbody tr"));`
            },
            updateRowData: {
                key: "updateRowData",
                relyInit: !0,
                title: "更新指定行所使用的数据",
                code: `GridManager.updateRowData('${gridManagerName}', 'id', {id: 112, title: 'ccc'});`
            },
            updateTreeState: {
                key: "updateTreeState",
                relyInit: !0,
                title: "更新树的展开状态",
                code: `GridManager.updateTreeState('${gridManagerName}', true);`
            },
            setSort: {
                key: "setSort",
                relyInit: !0,
                title: "手动设置排序",
                code: `GridManager.setSort('${gridManagerName}', {createDate: 'ASC'});`
            },
            setConfigVisible: {
                key: "setConfigVisible",
                relyInit: !0,
                title: "设置表头配置区域可视状态",
                code: `GridManager.setConfigVisible('${gridManagerName}', true);`
            },
            setLineHeight: {
                key: "setLineHeight",
                relyInit: !0,
                title: "配置行的高度",
                code: `GridManager.setLineHeight('${gridManagerName}', '70px');`
            },
            showTh: {
                key: "showTh",
                relyInit: !0,
                title: "设置列为可视状态",
                code: `GridManager.showTh('${gridManagerName}', 'pic');`
            },
            hideTh: {
                key: "hideTh",
                relyInit: !0,
                title: "设置列为隐藏状态",
                code: `GridManager.hideTh('${gridManagerName}', 'pic');`
            },
            exportGrid: {
                key: "exportGrid",
                relyInit: !0,
                title: "导出指定表格",
                code: `GridManager.exportGrid('${gridManagerName}', 'demo中使用的导出').then(res=>{console.log('success')}).catch(err=>{console.error('error', err)});`
            },
            setQuery: {
                key: "setQuery",
                relyInit: !0,
                title: "更改在生成组件时所配置的参数query",
                code: `GridManager.setQuery('${gridManagerName}', {'userName':'baukh','sex':'男'});`
            },
            setAjaxData: {
                key: "setAjaxData",
                relyInit: !0,
                title: "用于再次配置ajaxData数据",
                code: `GridManager.setAjaxData('${gridManagerName}', {data: [{title: '通过setAjaxData动态添加的数据，其它项为空'}], totals: 1});`
            },
            refreshGrid: {
                key: "refreshGrid",
                relyInit: !0,
                title: "刷新表格",
                code: `GridManager.refreshGrid('${gridManagerName}');`
            },
            renderGrid: {
                key: "renderGrid",
                relyInit: !0,
                title: "渲染表格",
                code: `GridManager.renderGrid('${gridManagerName}');`
            },
            getCheckedTr: {
                key: "getCheckedTr",
                relyInit: !0,
                title: "获取当前选中的行",
                code: `GridManager.getCheckedTr('${gridManagerName}');`
            },
            getCheckedData: {
                key: "getCheckedData",
                relyInit: !0,
                title: "获取选中行的渲染数据",
                code: `GridManager.getCheckedData('${gridManagerName}');`
            },
            setCheckedData: {
                key: "setCheckedData",
                relyInit: !0,
                title: "设置选中的数据",
                code: `GridManager.setCheckedData('${gridManagerName}', [GridManager.getTableData('${gridManagerName}')[1]]);`
            },
            cleanData: {
                key: "cleanData",
                relyInit: !0,
                title: "清除指定表格数据",
                code: `GridManager.cleanData('${gridManagerName}');`
            },
            print: {key: "print", relyInit: !0, title: "打印当前页", code: `GridManager.print('${gridManagerName}');`},
            showRow: {
                key: "showRow",
                relyInit: !0,
                title: "显示隐藏行",
                code: `GridManager.showRow('${gridManagerName}', 1);`
            },
            hideRow: {
                key: "hideRow",
                relyInit: !0,
                title: "隐藏行",
                code: `GridManager.hideRow('${gridManagerName}', 1);`
            },
            showLoading: {
                key: "showLoading",
                relyInit: !0,
                title: "显示加载中",
                code: `GridManager.showLoading('${gridManagerName}');`
            },
            hideLoading: {
                key: "hideLoading",
                relyInit: !0,
                title: "隐藏加载中",
                code: `GridManager.hideLoading('${gridManagerName}', 300);`
            },
            destroy: {
                key: "destroy",
                relyInit: !0,
                title: "消毁指定的GridManager实例",
                code: `GridManager.destroy('${gridManagerName}');`
            }
        }, arg = {
            gridManagerName: "test",
            width: "100%",
            height: "100%",
            autoOrderConfig: {fixed: "left"},
            checkboxConfig: {key: "id", fixed: "left"},
            supportAjaxPage: !0,
            sortMode: "single",
            supportMenu: !0,
            menuHandler: e => (e.unshift({
                content: "自定义菜单", line: !0, onClick: e => {
                    alert(e)
                }
            }), e),
            useCellFocus: !0,
            useHideRow: !0,
            supportMoveRow: !0,
            moveRowConfig: {
                key: "priority", useSingleMode: !0, fixed: "left", handler: (e, t) => {
                    console.log(e, t)
                }
            },
            disableCache: !1,
            ajaxData: function (e, t) {
                return "/back-management/CommitteeNameList.html"
            },
            exportConfig: {
                fileName: e => {
                    const t = new Date;
                    let a = `${t.getFullYear()}-${t.getMonth() + 1}-${t.getDate()}`;
                    for (let t in e) a = `${a}-${t}=${e[t]}`;
                    return a
                }, suffix: "xls"
            },
            ajaxType: "POST",
            checkedBefore: function (e, t, a) {
                return console.log("checkedBefore==", e, t, a), a && 90 === a.id && alert("该节点在checkedBefore中配置为不可选"), a && 90 !== a.id
            },
            checkedAfter: function (e, t, a) {
                console.log("checkedAfter==", e, t, a)
            },
            checkedAllBefore: function (e, t) {
                console.log("checkedAllBefore==", e, t)
            },
            checkedAllAfter: function (e, t) {
                console.log("checkedAllAfter==", e, t)

            },
            sortingBefore: function (e) {
                console.log("sortingBefore", e)
            },
            sortingAfter: function (e) {
                console.log("sortingAfter", e)
            },
            ajaxBeforeSend: function (e) {
                console.log("ajaxBeforeSend")
            },
            ajaxSuccess: function (e) {
                document.getElementById("loading").style.display = "none";
                console.log("ajaxSuccess")
            },
            ajaxError: function (e) {
                console.log("ajaxError")
            },
            ajaxComplete: function (e) {
                console.log("ajaxComplete")
            },
            adjustBefore: e => {
                console.log("adjustBefore=>", e)
            },
            adjustAfter: e => {
                console.log("adjustAfter=>", e)
            },
            responseHandler: e => (e.data.forEach((e => {
                e.priority = e.id
            })), e),
            rowRenderHandler: (e, t) => e,
            emptyTemplate: e => `<div style="text-align: center;">${e.query.title ? "搜索为空" : "暂无数据"}</div>`,
            columnData: [
                {
                    key: "committee_name",
                    text: "名称",
                    align: "center",
                }, {
                    key: "committee_level",
                    text: "级别",
                    align: "center",
                }, {
                    key: "liaison_officer",
                    text: "联络人",
                    align: "center",
                }, {
                    key: "company",
                    text: "办公室",
                    align: "center",
                }, {
                    key: "action",
                    width: "150px",
                    align: "center",
                    fixed: "right",
                    disableMoveRow: !0,
                    disableRowCheck: !0,
                    text: '<span style="color: red">操作</span>',
                    template: (e, t) => `<a class="plugin-action" href="javascript:;" onclick="delete_expert_database(${t.id})" style="color: red;">删除</a>`
                }]
        }, demo1 = {
            initSearch: function () {
                {#document.querySelector(".search-action").addEventListener("click", (function () {#}
                {#    var data_value = document.getElementById("search_value").value;#}
                {#    var e = {#}
                {#        search_data: data_value,#}
                {#    };#}
                {#    table.GM("setQuery", e, (function () {#}
                {#        console.log("setQuery执行成功")#}
                {#    }))#}
                {# }))#}
            }, initFN: () => {

            }, initGM: function () {
                new window.GridManager(table, arg, (e => {
                    console.log("渲染完成后的回调函数:", e), console.log(arg.columnData)
                }))
            }, editRowData: function (e) {
                window.GridManager.updateRowData("test", "id", {
                    id: window.parseInt(e.getAttribute("data-id")),
                    lastDate: (new Date).getTime()
                })
            }
        }, table = document.querySelector("#main_table");
        demo1.initSearch(table), demo1.initGM(table), demo1.initFN();

        let title = document.querySelector("#box");
        let addForm = document.querySelector("#new_models3");
        title.addEventListener("mousedown", function (e) {
            let x = e.pageX - addForm.offsetLeft;
            let y = e.pageY - addForm.offsetTop;

            document.addEventListener("mousemove", move);
            function move(e) {
                addForm.style.left = e.pageX - x + 'px';
                addForm.style.top = e.pageY - y + 'px';
            }

            document.addEventListener("mouseup", function (e) {
                document.removeEventListener("mousemove", move);
            })
        });

        function line_models() {
            document.getElementById("new_models2").style.display = "table-row";
        }

        function close_models3() {
            document.getElementById("new_models2").style.display = "none";
        }

        function delete_topic(SubjectId) {
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            var local_host = window.location.host;          // 获取当前IP
            xhr.open('post', "/back-management/ComputerRelatedDetail.html", true);
            xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
            xhr.send("SubjectId="+String(SubjectId)+"&type=delete");
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        if (JsonDate['code'] === 200) {
                            console.log('JsonDate', JsonDate)
                            alert('删除成功')
                            window.location.reload();
                        } else {
                            alert(JsonDate['message'])
                            window.location.reload();
                        }

                    }
                }
             }
        }

        function upload_excel() {
            var form = new FormData();
            var committee_name = document.getElementById("committee_name").value;
            var committee_level = document.getElementById("committee_level").value;
            var chairman = document.getElementById("chairman").value;
            var vice_chairman = document.getElementById("vice_chairman").value;
            var liaison_officer = document.getElementById("liaison_officer").value;
            var company = document.getElementById("company").value;
            var members = document.getElementById("members").value;
            if (!committee_name) {
                alert("请输入委员会名称！")
                return false
            }
            if (!committee_level) {
                alert("请选择委员会级别！")
                return false
            }
            if (!chairman) {
                alert("请输入主任委员！")
                return false
            }
            if (!vice_chairman) {
                alert("请输入副主任委员！")
                return false
            }
            if (!liaison_officer) {
                alert("请输入联络人！")
                return false
            }
            if (!company) {
                alert("请选择办公室！")
                return false
            }
            if (!members) {
                alert("请输入委员！")
                return false
            }
            form.append('committee_name', committee_name);
            form.append('committee_level', committee_level);
            form.append('chairman', chairman);
            form.append('vice_chairman', vice_chairman);
            form.append('liaison_officer', liaison_officer);
            form.append('company', company);
            form.append('members', members);
            document.getElementById("loading").style.display = "inline-block";

            var xhr = new XMLHttpRequest();
            xhr.open('post', "/back-management/CommitteeNameSave.html", true);
            xhr.send(form);
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert(JsonDate['message'])
                        if (JsonDate['code'] === 200) {
                            location.reload()
                        }
                    }
                }
            };
        }

        function delete_expert_database(obj_id) {
            var form = new FormData();
            form.append('flow_id', obj_id);
            document.getElementById("loading").style.display = "inline-block";
            var xhr = new XMLHttpRequest();
            xhr.open('get', "/back-management/UploadExpertRoster?flow_id="+String(obj_id), true);
            xhr.send();
            xhr.onreadystatechange = function () {
                if (xhr.readyState === 4) {
                    if (xhr.status === 200) {
                        document.getElementById("loading").style.display = "none";
                        var JsonDate = JSON.parse(xhr.responseText);
                        console.log(JsonDate);
                        alert(JsonDate['message'])
                        if (JsonDate['code'] === 200) {
                            location.reload()
                        }
                    }
                }
            };
        }

        function scrollConversationScreen() {
            $('#selected-div').scrollTop($('#selected-div')[0].scrollHeight);
        }

        function IdentifyPersonnel(obj_id) {
            var prople_list = [];
            var selected_personnel_list = document.getElementsByClassName('selected-personnel');
            for (var i=0; i<selected_personnel_list.length; i++) {
                prople_list.push(selected_personnel_list[i].innerText)
            }
            document.getElementById(obj_id).value = prople_list.join();
            close_model()
        }

        var company_list = {{ company_list | safe }};

        function search_dep(){
            var search_keyword = document.getElementById("search_data1").value;
            var processed = document.getElementById("processed");
            processed.innerHTML = "";
            console.log(company_list.length)
            for (var h=0; h<company_list.length; h++){
                if (company_list[h]["name"].indexOf(search_keyword) !== -1){
                    console.log(company_list[h]["name"])
                    var div_tag = document.createElement("div");div_tag.className="div_clase";
                    div_tag.innerHTML = '<input class="check_box1" id="check-'+company_list[h]["id"]+'" type="checkbox" onclick="check_dep_ff(\''+company_list[h]["name"]+'\', \'check-'+company_list[h]["id"]+'\')"> '+ company_list[h]["name"];
                    processed.appendChild(div_tag)
                }
            }
        }

        function summit_val() {
            var processed_prople = document.getElementsByClassName("selected-department");
            var dep_list = [];
            for (var i=0; i<processed_prople.length; i++) {
                dep_list.push(processed_prople[i].innerText.split("(")[0])
            }
            document.getElementById("company").value=dep_list.join();
            close_office_models()
        }

        function views_detail() {

        }
    </script>
</body>
</html>